package com.cwl.pattern.责任链模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-07-05 17:56
 **/
public class ChainOfResponsibilityPattern {

    public static void main(String[] args) {
        //组装责任链
        Handler handler1=new ConcreteHandlerA();
        Handler handler2=new ConcreteHandlerB();
        handler1.setNext(handler2);
        //提交请求
        handler1.handleRequest("two");
    }
}
